<!doctype html>
<html>
  <head>
    <title>Test Portal</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type="text/css">
      portal {
        border: solid;
      }
    </style>
  </head>
  <body>
    <h1>Test Portal</h1>
    <script>
      var portal = document.createElement('portal');
      var portalLoaded = new Promise((resolve) => {
        portal.onload = resolve;
      });
      portal.src = 'basic-content.html';
      document.body.appendChild(portal);

      async function activatePortal() {
        await portalLoaded;
        await portal.activate();
      }
    </script>
  </body>
</html>
